home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7606 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.crystalball.com!news
  2. From: Larry Weiss <lfw@oc.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Checking For Keyboard Input ( off topic )
  5. Date: Tue, 27 Feb 1996 11:28:08 -0600
  6. Organization: crystalball.com
  7. Message-ID: <31333F28.76BD@oc.com>
  8. References: <cerebus.34.000DD98A@voicenet.com> <4gqriq$qf2@maureen.teleport.com> <3131EA31.167E@mozart.bme.ohio-state.edu> <4gut23$5l9@news-srv2.fmr.com>
  9. NNTP-Posting-Host: external.oc.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win16; I)
  14.  
  15. William A. Bailey wrote:
  16.  > 
  17.  > Xiaoyi Wu <xiaoyi@mozart.bme.ohio-state.edu> wrote:
  18.  > >GHouck wrote:
  19.  > >> cerebus@voicenet.com (aLEX) wrote:
  20.  > >> >Hello fellow C programmers,
  21.  > >> >        Is there anyway to check if keyboard input has been entered without
  22.  > >> >actually stalling the excution of the code until the user presses a key.  
  23.  
  24.  > >> aLEX,
  25.  > >> There is if you're using Borland on DOS/Windows: there is a function called
  26.  > >>   kbhit()
  27.  > >> If a key has been hit, it returns a non-zero value, else it returns zero.  If
  28.  > >> one is available you can then get it with another call.
  29.  > >> Yours, Geoff Houck
  30.  > >
  31.  > >What about Unix?
  32.  > Use the select function.
  33.  
  34.  
  35. This subject is off topic for comp.lang.c
  36.